﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QuanLyThongTinNhanKhau.model.DAO
{
    class TKTamVangDAO
    {
        SQLServiceDAO service = new SQLServiceDAO();


        internal DataTable btnThongKe(string fromDate, string toDate)
        {
            String sql = "select MaTamVang, t.MaNhanKhau, HoTen, GioiTinh, CMND, NoiThuongTru, NgayTamVang, LyDoTamVang, Case when t.TinhTrang = 'Enable' then N'Mở' else N'Đóng' End AS TinhTrang from TAMVANG t join NHANKHAU n on t.MaNhanKhau = n.MaNhanKhau where NgayTamVang >='" + fromDate + "' and NgayTamVang <='" + toDate + "'";
            return service.getDataTable(sql);
        }
    }
}
